#include "get_filename.h"
#include <boost/filesystem/path.hpp>


//
// returns file_name
// 
std::string get_filename(const std::string& path)
{
	return boost::filesystem::path(path).leaf().string();
}

std::string get_lastdir_filename(const std::string& path)
{
	boost::filesystem::path last_dir = boost::filesystem::path(path).branch_path();
	last_dir = boost::filesystem::path(last_dir.leaf()) / boost::filesystem::path(boost::filesystem::path(path).leaf());
	return last_dir.string();
}


